package com.gopay.common.domain.cbrmb.customs.base;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import com.gopay.common.constants.cbrmb.customs.NameSpace;

/**
 * 
 * @ClassName: CEB411Message 
 * @Description:CEB411Message为支付报文XML根节点名称，包括guid和version两个属性 
 * @author gd.cui 
 * @date 2017年1月14日 上午10:08:44
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "guid", "version", "payment", "baseTransfer" })
@XmlRootElement(name = "CEB411Message", namespace = NameSpace.NAMESPACE_CEB_URI)
public class CEB411Message {
	/**
	 * 报文的36位系统唯一序号（英文字母大写）。
	 */
	@XmlAttribute(name = "guid" ,required = true)
	private String guid;

	/**
	 * 报文版本号，默认为1.0
	 */
	@XmlAttribute(name = "version", required = true)
	private String version;

	/**
	 * 放置支付单业务的相关信息
	 */
	@XmlElement(name = "Payment", namespace = NameSpace.NAMESPACE_CEB_URI, required = true)
	private Payment payment;
    
	/**
	 * 放置报文传输企业信息。
	 */
	@XmlElement(name = "BaseTransfer", namespace = NameSpace.NAMESPACE_CEB_URI, required = true)
	private BaseTransfer baseTransfer;

	public String getGuid() {
		return guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public Payment getPayment() {
		return payment;
	}

	public void setPayment(Payment payment) {
		this.payment = payment;
	}

	public BaseTransfer getBaseTransfer() {
		return baseTransfer;
	}

	public void setBaseTransfer(BaseTransfer baseTransfer) {
		this.baseTransfer = baseTransfer;
	}

	@Override
	public String toString() {
		String lineSeparator = System.getProperty("line.separator");
		StringBuilder sb = new StringBuilder();
		sb.append("**********CEB411Message************");
		sb.append(lineSeparator);
		sb.append(getGuid());
		sb.append(lineSeparator);
		sb.append(getVersion());
		sb.append(lineSeparator);
		sb.append(getPayment());
		return sb.toString();
	}

}
